package myjobs;

import ircbot.*;

/**
 * A test job i made, to test the bot. I have not futher documentation for this one.
 * 
 * @author andreas
 */
public class EchoJob extends AbstractJob {
    private Bot bot;
    private String channel;

    public EchoJob(Bot bot, String channel) {
        this.bot = bot;
        this.channel = channel;
    }

    @Override
    public void onMessage(String channel, String sender, String login, String hostname, String message) {
        if(channel.equalsIgnoreCase(this.channel)) {
            bot.sendMessage(this.channel, message);
        }
    }
}
